package com.raising.framework.filter.realm;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 参数存储类
 * 新增type属性，用来判断是否是手机快捷登录
 * @author gaoy
 * 2017 2017-5-8 下午8:27:51
 */
public class MyUsernamePasswordToken extends UsernamePasswordToken{
	private static final long serialVersionUID = 7722844857996704874L;
	/**登录类型，普通登录为空，手机快捷登录为phone*/
	private String type;
	/**验证码*/
	private String validateCode;
	/**跳转路径*/
	private String jumpUrl;

	public MyUsernamePasswordToken(final String username, final String password,final String type,
            final String validateCode,final String jumpUrl,final boolean rememberMe, final String host) {
		this(username, password != null ? password.toCharArray() : null,type,validateCode,jumpUrl, rememberMe, host);
	}
	public MyUsernamePasswordToken(){}
	
	public MyUsernamePasswordToken(final String username, final char[] password,final String type,
								   final String validateCode,final String jumpUrl,final boolean rememberMe, final String host) {
		super.setUsername(username);
		super.setPassword(password);
		this.type = type;
		this.validateCode = validateCode;
		this.jumpUrl = jumpUrl;
		super.setRememberMe(rememberMe);
		super.setHost(host);
	}

	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}

	public String getValidateCode() {
		return validateCode;
	}

	public void setValidateCode(String validateCode) {
		this.validateCode = validateCode;
	}

	public String getJumpUrl() {
		return jumpUrl;
	}

	public void setJumpUrl(String jumpUrl) {
		this.jumpUrl = jumpUrl;
	}
}
